// pages/hello/bingevent/index.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    counter: 1,
    msg: '等待点击',
    inputValue: '预先定义的数据',
  },


  counterPlus(event) {
    //修改数据 调用   this.setData({key:value})
    //获取数据  this.data.key ?

    this.setData({ counter: this.data.counter + 1 })
  },
  btnClick(event) {

    /**
     * {num:1,name:'张三'} 
     */
    const { num } = event.currentTarget.dataset;
    console.log("event", event);

    this.setData({ msg: '点击了按钮:' + num })
  },
  inputChange(event) {
    console.log("input", event);
    this.setData({ inputValue: event.detail.value })
  }






})